package com.jerry.huihome.module.register.activity;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.jerry.huihome.R;
import com.jerry.huihome.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by Administrator on 2016/5/16.
 */
public class PersonalInformationActivity extends BaseActivity {
    @BindView(R.id.ed_nickname)
    EditText edNickname;
    @BindView(R.id.ed_community)
    EditText edCommunity;
    @BindView(R.id.tv_apartment)
    TextView tvApartment;
    @BindView(R.id.iv_select_apartment)
    ImageView ivSelectApartment;
    @BindView(R.id.et_size)
    EditText etSize;
    @BindView(R.id.btn_complete)
    Button btnComplete;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_personal_info;
    }


    @OnClick({R.id.iv_select_apartment, R.id.btn_complete})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_select_apartment:
              showSelect();
                break;
            case R.id.btn_complete:
                break;
        }
    }

    private void showSelect() {
        final String [] item = {"一室","二室","三室","四室及以上","别墅","其他"};
        AlertDialog dialog = new AlertDialog.Builder(this)
                .setTitle("户型")
                .setSingleChoiceItems(item, -1, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        tvApartment.setText(item[which]);
                    }
                }).show();
    }
}
